﻿using System.ComponentModel;
using InfiniTec;

namespace ApiScannerShell
{
    public class SelectableItem<T>: INotifyPropertyChanged
    {
        private bool _IsSelected;
        public event PropertyChangedEventHandler PropertyChanged;

        public SelectableItem(T value)
        {
            Value = value;
        }

        public bool IsSelected
        {
            get { return _IsSelected; }
            set
            {
                if (value != _IsSelected)
                {
                    _IsSelected = value;
                    PropertyChanged.Raise(this, "IsSelected");
                }
            }
        }

        public T Value { get; private set; }
    }
}